package com.lxl.starter;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 1、配置绑定的类
 * 作用：application写的配置最终会注入到这个类
 */
@Component
@ConfigurationProperties(prefix = "myapp.hello") // 绑定的配置前缀
public class HelloProperties {

    private String suffix; // 最终注入的属性

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }
}
